package cn.gyouzhe.service.impl;

import cn.gyouzhe.entity.FeedBack;
import cn.gyouzhe.mapper.FeedbackMapper;
import cn.gyouzhe.service.IFeedBackService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

/**
 * 意见反馈service
 *
 * @author wangchuan
 * @datetime 2018/3/30 0:30
 */
@Service
@Transactional(readOnly = true)
public class FeedBackService implements IFeedBackService{
    @Autowired
    private FeedbackMapper feedbackMapper;

    /**
     * 保存意见反馈
     * @param feedBack 意见实体
     */
    @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Throwable.class)
    @Override
    public void saveFeedback(FeedBack feedBack) {
        feedbackMapper.saveFeedback(feedBack);
    }
}
